<?php
namespace api\jeu\perso\caracteristique;
use api\jeu\perso as nsPerso;

class Observer {

	private $obs;
	private $methode;

	function __construct(nsPerso\iObserver $observateur, $methode) {
		$this->obs = $observateur;
		$this->methode = $methode;
	}
	
	function run() {
	
		$methode = $this->methode;
		$observateur = $this->obs;
	
		$observateur->event($methode);
		
	}

	function getName() {
		return get_class($this->obs) . '_' . $this->methode;
	}
	
	function getObs() {
		return $this->obs;
	}
	
	function setObs(nsPerso\iObserver $value) {
		$this->obs = $value;
	}	
	
	function getMethode() {
		return $this->methode;
	}	
	
	function setMethode($value) {
		$this->methode = $value;
	}	
	
}